<c:if test="true"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxd="http://nuxeo.org/nxweb/document"
  xmlns:nxh="http://nuxeo.org/nxweb/html"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:nxp="http://nuxeo.org/nxweb/pdf">
  <nxu:set var="typeLabel" value="#{nxd:typeLabel(field)}">
    <nxu:set var="label" value="#{empty field_2 ? messages[typeLabel] : messages[field_2]}">
      <c:if test="#{nxl:isLikePlainMode(widget.mode)}">#{nxd:titleOrId(field_0)}</c:if>
      <c:if test="#{nxl:isLikeViewMode(widget.mode)}">

        <div class="popupTarget" docRef="#{field_1}">

          <span id="title_#{field_1}" title="#{label}" class="documentTitle">
            <c:if test="#{widgetProperty_localize}">
              #{messages[nxd:titleOrId(field_0)]}
            </c:if>
            <c:if test="#{!widgetProperty_localize}">
              #{nxd:titleOrId(field_0)}
            </c:if>
          </span>

          <c:if test="#{!widgetProperty_hideDownloadLink}">
            <nxh:outputLink
              rendered="#{field_0.hasSchema(widget.properties.file_schema) and !empty field_3}"
              value="#{nxd:fileUrl('downloadFile', field_0, widget.properties.file_property_name, field_4)}"
              styleClass="documentDownloadLink">
              <nxh:graphicImage value="/icons/download.png"
                title="#{nxd:fileDescription(field_0, widget.properties.file_property_name, widget.properties.filename_property_name, field_4)}"
                alt="#{nxd:fileDescription(field_0, widget.properties.file_property_name, widget.properties.filename_property_name, field_4)}" />
            </nxh:outputLink>
          </c:if>
        </div>

      </c:if>
    </nxu:set>
  </nxu:set>
</c:if>
